package main.java.FSMDE.validation.rules;

import main.java.ERMDE.validation.ValidationType;
import main.java.FSMDE.models.Component;
import main.java.FSMDE.models.Diagram;
import main.java.FSMDE.models.Interface;
import main.java.FSMDE.validation.IValidationEntry;


public class GenericComponentTypeValidationEntry implements IValidationEntry {
	
	private Component component;
	private Interface fsminterface;
	private Diagram diagram;
	
	public GenericComponentTypeValidationEntry(Diagram diagram, Interface inface, Component component){
		this.diagram = diagram;
		this.fsminterface = inface;
		this.component = component;
	}
	
	@Override
	public Diagram getDiagram() {
		return this.diagram;
	}

	@Override
	public String getMessage() {
		return String.format("Generic Component '%s' in Interface '%s' has no assigned type.", this.component.getName(), this.fsminterface.getName());
	}

	@Override
	public ValidationType getType() {
		return ValidationType.WARNING;
	}

}
